package com.klf.system.bo;

import java.util.List;

import com.googlecode.jsonplugin.annotations.JSON;
import com.klf.po.SysMenutype;
import com.klf.system.dao.BilloffareDAOImpl;
import com.klf.system.dao.SysMenutypeDAOImpl;

public class SysMenutypeBoImpl implements ISysMenutypeBo {
	
	@SuppressWarnings("unused")
	private SysMenutypeDAOImpl sysMenutypeDAOImpl;
	

	public SysMenutypeDAOImpl getSysMenutypeDAOImpl() {
		return sysMenutypeDAOImpl;
	}

	public void setSysMenutypeDAOImpl(SysMenutypeDAOImpl sysMenutypeDAOImpl) {
		this.sysMenutypeDAOImpl = sysMenutypeDAOImpl;
	}

	public void add(Object obj){
		// TODO Auto-generated method stub
		try {
			SysMenutype c = (SysMenutype)obj;
			sysMenutypeDAOImpl.add(c);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public void delete(Long[] id) {
		// TODO Auto-generated method stub
		try {
			sysMenutypeDAOImpl.deleteByIds(SysMenutype.class, id);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public void delete(Long id) {
		// TODO Auto-generated method stub
		try {
			sysMenutypeDAOImpl.deleteById(SysMenutype.class, id);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public List<SysMenutype> getAll(String className) {
		// TODO Auto-generated method stub
		try {
			List list = sysMenutypeDAOImpl.getAll(className);
			List<SysMenutype> ls = list;
			return ls;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	public Object getObjectById(Long id) {
		// TODO Auto-generated method stub
		try {
			return sysMenutypeDAOImpl.getObjectById(SysMenutype.class, id);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}

	public void update(Object obj) {
		// TODO Auto-generated method stub
		try {
			sysMenutypeDAOImpl.update(obj);
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}

	public List<SysMenutype> getAll(String className, int start, int count)
			throws Exception {
		// TODO Auto-generated method stub
		try {
			List list = sysMenutypeDAOImpl.getPageObject(className, start, count);
			List<SysMenutype> ls = list;
			return ls;
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return null;
	}


	

}
